import React, { Component } from 'react';
import { Row, Col, Select } from 'antd';
const { Option } = Select

class CopySelect extends Component {
  constructor(props) {
    super(props);
    this.state = {
      copyType: undefined
    };
  }

  componentDidMount() {
  }

  onChange = (value) => {
    this.setState({ copyType: value })
  }

  render() {
    return (
      <div style={{ height: 120 }}>
        <Row type="flex" align="middle">
          <Col span={6}><p style={{ textAlign: 'right' }}>将组件复制到：</p></Col>
          <Col span={18}>
            <Select
              showSearch
              style={{ width: '100%' }}
              placeholder="请选择"
              onChange={this.onChange}
              value={this.state.copyType}
            >
              <Option value="1">当前事件</Option>
              <Option value="2">组件模板</Option>
            </Select>
          </Col>
        </Row>
      </div>
    );
  }
}

export default CopySelect;
